﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PBOfficeMaster.master" AutoEventWireup="true"
    CodeFile="MessageManager.aspx.cs" Inherits="Message_MessageManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="Stylesheet" href="../css/ScheduleManagerCss.css" />
    <style type="text/css">
        .lbAdd
        {
            text-decoration: none;
        }
        
        
        
        .mlength
        {
            display: block;
            width: 100px;
            overflow: hidden;
            white-space: nowrap;
            -o-text-overflow: ellipsis;
            text-decoration: none;
            text-overflow: ellipsis;
        }
    </style>
     <script language="javascript" type="text/javascript">
         function OpenContent(width, height,id) {
       
             window.showModalDialog("Contents.aspx?msgId="+id,'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;help:no;status:no')

         }
         function OpenUser(width, height, id) {
             window.showModalDialog("AllUser.aspx?msgId="+id, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;help:no;status:no')
         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 864px; font-size: 14px;">
        <div class="branchtop">
            <table>
                <tr>
                    <td>
                        当前位置
                    </td>
                    <td>
                        <div class="lbBranch">
                            消息管理</div>
                    </td>
                </tr>
            </table>
        </div>
        <hr />
        <div style="text-align: left; margin: 15px 40px;">
            请输入填写消息的时间--<asp:Image ID="Image3" runat="server" ImageUrl="~/imges/bird.png" /></div>
        <div style="text-align: left; margin: 15px 40px;">
            开始时间<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>*----结束时间<asp:TextBox
                ID="TextBox2" runat="server"></asp:TextBox>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:RadioButton ID="rbDay" runat="server" Text="本日" GroupName="time" /><asp:RadioButton
                ID="rbWeek" runat="server" Text="本周" GroupName="time" /><asp:RadioButton ID="rbMonth"
                    runat="server" Text="本月" GroupName="time" />&nbsp; <asp:ImageButton ID="imgbtnS" runat="server"
                        ImageUrl="~/imges/serch.jpg" Height="18px" Width="18px" /></div>
        <div style="text-align: right; margin-top: 15px; padding-right: 10px;">
            <asp:Image ID="Image2" runat="server" ImageUrl="~/imges/handle.jpg" /><asp:LinkButton
                ID="lbtnAddNew" CssClass="lbAdd" runat="server" PostBackUrl="~/Message/AddMessage.aspx">添加新消息</asp:LinkButton></div>
        <div style="margin: 5px 20px; font-size: 12px;">
            <asp:GridView ID="GridView1" runat="server" Width="822px" AutoGenerateColumns="False"
                Height="106px" OnRowDataBound="GridView1_RowDataBound" 
                onrowcommand="GridView1_RowCommand" onrowdeleting="GridView1_RowDeleting" 
                DataKeyNames="MessageId">
                <Columns>
                    <asp:BoundField DataField="Title" HeaderText="消息标题" />
                    <asp:TemplateField HeaderText="消息类型">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Type.MessageTypeName") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("Type.MessageTypeName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="消息内容">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Contents") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton2" runat="server" CssClass="mlength" Text='<%# Bind("Contents") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="FromUserId" HeaderText="创建者" />
                    <asp:BoundField DataField="MessageId" HeaderText="发送对象" />
                    <asp:BoundField DataField="BeginTime" HeaderText="开始时间" />
                    <asp:BoundField DataField="EndTime" HeaderText="结束时间" />
                    <asp:BoundField DataField="RecordTime" HeaderText="创建时间" DataFormatString="{0:yy-MM-dd}" />
                    <asp:TemplateField HeaderText="修改">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="imgModify" runat="server" CommandName="modify"
                                ImageUrl="~/imges/modify.png" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton2" runat="server" CommandName="delete" ImageUrl="~/imges/delete.png" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="IfPublish" HeaderText="发布">
                        <ItemStyle BackColor="#EDF4FC" BorderColor="#000CCC" BorderStyle="Solid" BorderWidth="1px"
                            ForeColor="#70C1EC" />
                    </asp:BoundField>
                </Columns>
                <HeaderStyle BackColor="#64CCFF" ForeColor="White" Height="30px" />
                <RowStyle Height="20px" />
                <AlternatingRowStyle BackColor="#F6FBFF" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
